from wordcloud import WordCloud
import matplotlib.pyplot as plt

text = "捡到一束光,日落时还给太阳!"
wordcloud = WordCloud(
    font_path="msyh.ttc",
).generate(text)

plt.imshow(wordcloud, interpolation='bilinear')
plt.axis("off")
plt.show()